import { defineNuxtConfig } from 'nuxt/config';
export default defineNuxtConfig({
    modules: [
        '@nuxtjs/tailwindcss',
        '@nuxtjs/sitemap',
        // '~/modules/sitemap'
    ],
    buildModules: [
    ],
    config: {
      output: {
        globals: {
          vue: 'vue',
        }
      },
      external: ['vue'],
    },
    build: {
        postcss: {
            postcssOptions: require('./postcss.config.js'),
        },
    },
    vite: {
        logLevel: "info",
        optimizeDeps: {
            include: [
                'vue', 'element-plus', 'element-plus/lib/locale/lang/zh-cn', 'vue-router', 'element-plus/dist/index.full', 'ufo', 'axios'
            ]
        },

        // server: {
        //   proxy: {
        //     '/api': {
        //       target: 'http://dev.center.xiongmaodangao.com',
        //       changeOrigin: true,
        //       rewrite: (path) => path.replace(/^\/api/, '/api'),
        //     },
        //   },
        // },
        
        // plugins: [],
    },
    
    app: {
        head: {
            title: '熊猫不走蛋糕官网|小熊猫上门跳舞|让每个人的生日都能更快乐',
            meta: [
              { charset: 'utf-8' },
              { name: 'description', content: '熊猫不走生日蛋糕，进驻24座城市，全国超过2000万用户。以自主创新的“产品+服务”模式，通过线上下单，小熊猫免费送蛋糕上门，并提供跳舞、魔术等表演，致力于“让每个人的生日都更能快乐”。'},
              { name: 'keywords', content: '熊猫不走、熊猫蛋糕、生日蛋糕、蛋糕预定、熊猫跳舞、水果蛋糕、慕斯蛋糕、奶油蛋糕、芝士蛋糕、动物奶油蛋糕、私人定制'},
              {
                name: 'viewport',
                content: 'width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no'
              }
            ],
            link: [
              { rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' }
            ],
        },
    },
    sitemap: require('./sitemap.js'),
    // sitemap: {
      // hostname: 'http://localhost:3000',
    // },
    publicRuntimeConfig: {
      apiEnv: process.env.API_ENV || 'test'
    }
});
